<?php
/**
  * 操作员密码修改
  * operatorChgPwd.php
  * 模板文件：operatorChgPwd.html
  */
include_once("global.php");
include_once("functions/operator.php");

$operator = new operator;

//$DB->debug = true;
//取得参数
$pass	= $_REQUEST["pass"];
$pass2	= $_REQUEST["pass2"];
//

$errmsg = "";
if($chk == 1){
	if(empty($pass))	$errmsg .= "密码为空！<br/>";
	if($pass != $pass2)	$errmsg .= "两次密码不一样！<br/>";
}

if($chk == 1 && $errmsg == ""){
	$operator->operator_chgpwd($GLOBAL["OP_ID"], $pass);
	$errmsg = "修改成功！";
}

//模板设置
$smarty = $COMMON->template_init();

$smarty->assign(array(
			"errmsg"	=> $errmsg,
		));

$smarty->display("operatorChgPwd.html");
?>